<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePricesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prices', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('bond_code');//债券代码
            $table->bigInteger('j_k')->default(0);//今开
            $table->bigInteger('z_s')->default(0);//昨收
            $table->bigInteger('max')->default(0);//最高价
            $table->bigInteger('min')->default(0);//最低价
            $table->bigInteger('spj')->default(0);//收盘价
            $table->bigInteger('c_l')->default(0);//成交量
            $table->decimal('c_e',19,1)->default(0);//成交额
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prices');
    }
}
